﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using EpcTagLibrary;

namespace ALE_Server
{
    public class EPCWrapper : EPC
    {
        private TagEvent m_TagEvent;

        public EPCWrapper(TagEvent te)
            : base(te.Tag.GetBits())
        {
            m_TagEvent = te;
        }

        public override int[] GetFieldSplits()
        {
            return m_TagEvent.Tag.GetFieldSplits();
        }

        public override Uri GetTag()
        {
            return m_TagEvent.Tag.GetTag();
        }

        public override Uri GetEPC()
        {
            return m_TagEvent.Tag.GetEPC();
        }

        public override string GetScheme()
        {
            return m_TagEvent.Tag.GetScheme();
        }

        public override string GetSchemeName()
        {
            return m_TagEvent.Tag.GetSchemeName();
        }

        public short AntennaPort
        {
            get
            {
                return m_TagEvent.AntennaPort;
            }
        }

        public DateTime DiscoverTime
        {
            get
            {
                return m_TagEvent.DiscoverTime;
            }
        }

        public string LogicalReader
        {
            get
            {
                return m_TagEvent.LogicalReader;
            }
        }

        public DateTime RegisterTime
        {
            get
            {
                return m_TagEvent.RegisterTime;
            }
        }

        public override string ToString()
        {
            return m_TagEvent.Tag.ToString();
        }

        public override int GetHashCode()
        {
            return m_TagEvent.Tag.GetHashCode();
        }

        public override bool Equals(object obj)
        {
            return m_TagEvent.Tag.Equals(obj);
        }            
    }
}
